<template>
  <div>
    <h1>人员名单及爱好列表</h1>
    <ul>
      <li v-for="p in person" :key="p.id">
        <h2>姓名：{{ p.name }}</h2>
        <p>
          爱好:
          <span v-for="item in p.hobby" :key="item"> {{ item }}</span>
        </p>
      </li>
    </ul>
  </div>
</template>
<script>
// import Item from './components/Item.vue';
export default {
  name: 'App',
  data() {
    return {
      person: [
        {
          id: 1,
          name: '张三',
          hiobby: ['吃', '喝'],
        },
        {
          id: 2,
          name: '李四',
          hiobby: ['玩', '乐'],
        },
        {
          id: 3,
          name: '王五',
          hiobby: ['打游戏', '冲'],
        },
      ],
    };
  },
};
</script>
<style></style>
